<?php
require_once 'models/blog_model.php';
class BlogController extends Controller{
	public $blog_model;
	public $title;
	public $content;
	public $views;
	public $date_created;
	public $user_name;
	public $category;
	public $page;
	public function  __construct($_page){
		$this->blog_model = new BlogModel();
		$this->page = $_page;
	}
	public function display(){
		require_once 'views/default.php';
	}
	public function execute(){
		$this->getListNews();
		$this->display();		
	}
	public function getListNews(){
		$this->blog_model->listNews();
		$this->title = $this->blog_model->title;
	}
}